﻿using CPPEI.WPF;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace TestWPF
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            _ctlQueue.ItemsSource = this._ctlViewContainer.ViewQueue;
        }

        private void _ctlBtnView1_Click_1(object sender, RoutedEventArgs e)
        {
            this._ctlViewContainer.SwitchView(new TestWPF.Views.View1(), new CutInEffect());
        }

        private void _ctlBtnView1_Click_2(object sender, RoutedEventArgs e)
        {
            this._ctlViewContainer.SwitchView(new TestWPF.Views.View1(), new RotateEffect());
        }

        private void _ctlBtnView1_Click_3(object sender, RoutedEventArgs e)
        {
            this._ctlViewContainer.SwitchView(new TestWPF.Views.View1(), new FlipEffect());
        }


        private void _ctlBtnView2_Click_1(object sender, RoutedEventArgs e)
        {
            this._ctlViewContainer.SwitchView(new TestWPF.Views.View2(), new CutInEffect());
        }

        private void _ctlBtnView2_Click_2(object sender, RoutedEventArgs e)
        {
            this._ctlViewContainer.SwitchView(new TestWPF.Views.View2(), new RotateEffect());
        }

        private void _ctlBtnView2_Click_3(object sender, RoutedEventArgs e)
        {
            this._ctlViewContainer.SwitchView(new TestWPF.Views.View2(), new FlipEffect());
        }

        private void _ctlBtnView2_Click_4(object sender, RoutedEventArgs e)
        {
            this._ctlViewContainer.SwitchView(new TestWPF.Views.View2(), new QueueEffect());
        }

        protected override void OnMouseWheel(MouseWheelEventArgs e)
        {
            this._ctlViewContainer.Near();
            base.OnMouseWheel(e);
        }

        private void _ctlBtnTestSplitContainer_Click_1(object sender, RoutedEventArgs e)
        {
            new TestSplitContainerWindow().ShowDialog();
        }
    }
}
